#ifndef GRAPH_HPP
#define GRAPH_HPP
#include "node.hpp"
#include <map>
#include "tinyxml.h"

class Graph
{
public:
    Graph();
    ~Graph();
    void clear();

    Node* source();
    Node* sink();
    void addNode(Node*);
    void setSource(Node*);
    void setSink(Node*);
    bool importGraph(std::string fname);
    bool exportGraph(std::string fname);
    typedef std::map<std::string, Node*>::iterator node_it;
    std::map <std::string, Node*> nodes_;
    std::map <std::string, std::string> properties_;
private:
    int currentNew_;
    Node* source_;
    Node* sink_;

};

#endif // GRAPH_HPP
